package com.gitee.slowcreator.http.executor;

import com.gitee.slowcreator.http.config.ScHttpConfig;
import com.gitee.slowcreator.http.constant.HttpExecutorConstant;
import com.gitee.slowcreator.http.params.HttpClientParams;
import com.gitee.slowcreator.http.params.ScReturn;
import com.gitee.slowcreator.http.params.ScUnionParams;

/**
 * @author zxw
 * @date 2023/1/6 下午9:14
 */
public interface HttpExecutor {

    ScReturn doHttpRequest(HttpClientParams httpClient, ScUnionParams scUnionParams);

    /**
     * 执行器类型
     * 指定http执行器类型时会使用
     * 如果没使用{@link ScHttpConfig#setFixedHttp(String)} 则可以不重写这个方法
     *
     * @return
     */
    default String executorType() {

        return HttpExecutorConstant.EXECUTOR_TYPE_UNKNOWN;
    }
}
